#ifndef _CADSLICER_EXPORT_H_
#define _CADSLICER_EXPORT_H_

#include <iosfwd>
#include <cad-slicer/fwd.h>

#include <vector>
#include <array>


namespace cadslicer
{

/**
 * @brief Export slices of an object to interactive svg.
 * @param slices:  Slices of the object.
 * @param box_dimension: Size of the slicing box. Format {x, y}.
 * @param img_dim: Dimension of the output image. Format {size_x, size_y}.
 * @param filename File name of the output image.
 * @return True if success.
 */
bool export_to_svg(
    std::vector<slice> const& slices,
    std::array<float, 2> const& box_dimensions,
    std::array<unsigned, 2> const& img_dim,
    std::string const& filename);

/**
 * @brief Export a slice of an object to svg image.
 * @param sl:            Slice of the object.
 * @param box_dimension: Size of the slicing box. Format {x, y}.
 * @param img_dim:       Dimension of the output image. Format {size_x, size_y}.
 * @param filename:      File name of the output image.
 * @return True if success.
 */
bool export_to_svg(
    slice const& sl,
    std::array<float, 2> const& box_dimensions,
    std::array<unsigned, 2> const& img_dim,
    std::string const& filename);

/**
 * @brief Export a slice of an object to png image.
 * @param sl:            Slice of the object.
 * @param box_dimension: Size of the slicing box. Format {x, y}.
 * @param img_dim:       Dimension of the output image. Format {size_x, size_y}.
 * @param filename:      File name of the output image.
 * @return True if success.
 */
bool export_to_png(
    slice const& sl,
    std::array<float, 2> const& box_dimensions,
    std::array<unsigned, 2> const& img_dim,
    std::string const& filename);

} // cadslicer

#endif // _CADSLICER_EXPORT_H_
